<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*,com.javabean.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
		<%
		//获取ArrayList集合中的所有学生信息
		ArrayList ls = Student.list;
		%>
		
		<!-- 表头 -->
		<table border="1">
			<tr>
			<td>学号</td>
			<td>姓名</td>
			<td>性别</td>
			<td>年龄</td>
			<td>操作</td>
			</tr>
		<%
		for(int i = 0; i<ls.size(); i++){
			Student st =(Student) ls.get(i);//强制类型转换
		%>	
			<tr>
		<td><%=st.getNo() %></td>
		<td><%=st.getName() %></td>
		<td><%=st.getSex() %></td>
		<td><%=st.getAge() %></td>
		<td><a href="stu_update.jsp?no=<%=st.getNo() %>">修改</a>&nbsp;&nbsp;
		    <a href="delete?no=<%=st.getNo()  %>">删除</a>&nbsp;&nbsp;</td>	
			</tr>	
	  <%} %>		
		</table>
		<a href="stu_register.html">注册</a>
</body>
</html>